package com.xomily.devops.service.impl;

import java.util.List;
import com.xomily.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xomily.devops.mapper.DevProgramLogMapper;
import com.xomily.devops.domain.DevProgramLog;
import com.xomily.devops.service.IDevProgramLogService;

/**
 * 进程日志Service业务层处理
 * 
 * @author xomily
 * @date 2021-11-29
 */
@Service
public class DevProgramLogServiceImpl implements IDevProgramLogService 
{
    @Autowired
    private DevProgramLogMapper devProgramLogMapper;

    /**
     * 查询进程日志
     * 
     * @param id 进程日志主键
     * @return 进程日志
     */
    @Override
    public DevProgramLog selectDevProgramLogById(Long id)
    {
        return devProgramLogMapper.selectDevProgramLogById(id);
    }

    /**
     * 查询进程日志列表
     * 
     * @param devProgramLog 进程日志
     * @return 进程日志
     */
    @Override
    public List<DevProgramLog> selectDevProgramLogList(DevProgramLog devProgramLog)
    {
        return devProgramLogMapper.selectDevProgramLogList(devProgramLog);
    }

    /**
     * 新增进程日志
     * 
     * @param devProgramLog 进程日志
     * @return 结果
     */
    @Override
    public int insertDevProgramLog(DevProgramLog devProgramLog)
    {
        devProgramLog.setCreateTime(DateUtils.getNowDate());
        return devProgramLogMapper.insertDevProgramLog(devProgramLog);
    }

    /**
     * 修改进程日志
     * 
     * @param devProgramLog 进程日志
     * @return 结果
     */
    @Override
    public int updateDevProgramLog(DevProgramLog devProgramLog)
    {
        return devProgramLogMapper.updateDevProgramLog(devProgramLog);
    }

    /**
     * 批量删除进程日志
     * 
     * @param ids 需要删除的进程日志主键
     * @return 结果
     */
    @Override
    public int deleteDevProgramLogByIds(Long[] ids)
    {
        return devProgramLogMapper.deleteDevProgramLogByIds(ids);
    }

    /**
     * 删除进程日志信息
     * 
     * @param id 进程日志主键
     * @return 结果
     */
    @Override
    public int deleteDevProgramLogById(Long id)
    {
        return devProgramLogMapper.deleteDevProgramLogById(id);
    }
}
